package cate.game.cross.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBCross;

import java.util.ArrayList;

@ClientMsg(title = "本服所属的跨服组内的成员信息 の 请求")
public class CrossMemberListReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.sendNow(new CrossMemberListResp(new ArrayList<>(game.cross.getMemberList())));
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBCross.MEMBER_LIST_REQ;
    }
}
